﻿using Quartz;
using Quartz.Impl;
using Quartz.Spi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace LuShanTea.Admin.Web.Job
{
    public class GiveBossSendEmail
    {
        public static void TiMing()
        {
            IScheduler sched = new StdSchedulerFactory().GetScheduler();
            JobDetailImpl jdBossReport = new JobDetailImpl("jdTest", typeof(EveryDayJob));
            IMutableTrigger triggerBossReport = CronScheduleBuilder.DailyAtHourAndMinute(1, 58).Build();//每天 23:45 执行一次 
            triggerBossReport.Key = new TriggerKey("triggerTest");
            sched.ScheduleJob(jdBossReport,triggerBossReport); sched.Start(); 
        }
    }
}